//
//  LandViewController.m
//  悦享
//
//  Created by 韩双 on 16/3/28.
//  Copyright © 2016年 张洪国. All rights reserved.
//

#import "LandViewController.h"
#import <BmobSDK/BmobUser.h>

@interface LandViewController ()

@property (nonatomic, retain) UIButton *landButton;   /**< 登录 */
@property (nonatomic, retain) UIImageView *userImage;  /**< 用户头像 */


@end

@implementation LandViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.landButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_landButton setTitle:@"立即登录" forState:UIControlStateNormal];
    _landButton.backgroundColor = [UIColor whiteColor];
    [_landButton addTarget:self action:@selector(landAction:) forControlEvents:UIControlEventTouchUpInside];
    _landButton.layer.borderWidth = 1;
    _landButton.layer.borderColor = [UIColor blackColor].CGColor;
    [_landButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self.view addSubview:_landButton];
    [_landButton mas_makeConstraints:^(MASConstraintMaker *make) {
       
        
        
        make.centerX.equalTo(self.view);
        make.size.mas_equalTo(CGSizeMake(80, 30));
        make.top.mas_equalTo(self.view).with.offset(200);
        
    }];
    
    self.userImage = [[UIImageView alloc] init];
    [self.view addSubview:_userImage];
    [_userImage mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.bottom.equalTo(_landButton).with.offset(-70);
        make.size.mas_equalTo(CGSizeMake(70, 70));
        make.centerX.equalTo(self.view);
    }];
    _userImage.backgroundColor = [UIColor whiteColor];
    _userImage.layer.cornerRadius = 35;
    _userImage.image = [UIImage imageNamed:@"iconfont-yonghu"];
    
    
}
- (void)landAction:(UIButton *)land {
    
    NSLog(@"立即登录");
    
    LandAndResignViewController *landVC = [[LandAndResignViewController alloc] init];
    
    [self.navigationController pushViewController:landVC animated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
